package com.c212.manager.utils;


import com.c212.manager.bean.UserInfoEntity;

public class UserContext {
    private static final ThreadLocal<UserInfoEntity> USER_HODLER = new ThreadLocal<>();

    public static void setUser(UserInfoEntity user) {
        USER_HODLER.set(user);
    }

    public static void remove() {
        USER_HODLER.remove();
    }

    public static UserInfoEntity getUser() {
        return USER_HODLER.get();
    }
}
